<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLineTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('line', function (Blueprint $table) {
            $table->increments('id');       
            $table->string('line_name');        // 线路名称
            $table->string('line_area');        // 发团地点
            $table->decimal('line_price', 5, 2);       // 线路价格
            $table->decimal('duration', 3, 1);  // 发团时间
            $table->enum('line_type', ['1', '2', '3', '4']);  // 线路类型
            $table->date('start_time');         // 发车时间
            $table->char('phone', 11);          // 联系方式
            $table->string('contact');         // 联系人 
            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin');
    }
}
